package com.tiantian.quanminxiu.presenter;

import com.tiantian.quanminxiu.api.SocketUtils;
import com.tiantian.quanminxiu.view.DialogOpenGuradView;

/**
 * Created by admin on 2016/9/14.
 */
public class DialogOpenGuradPresent implements Presenter<DialogOpenGuradView> {

    private DialogOpenGuradView dialogOpenGuradView;

    @Override
    public void attachView(DialogOpenGuradView view) {
        this.dialogOpenGuradView = view;
    }

    @Override
    public void detachView() {
        this.dialogOpenGuradView = null;
    }

    public void openGuard(String giftId){
        dialogOpenGuradView.Loading_Open();
        SocketUtils.getInstance().sendMessage("Guardian", giftId);
        dialogOpenGuradView.Loading_Close();
        dialogOpenGuradView.openGurad();
    }
}
